<?php
/**
 * Yii view _upload_gallery
 *
 * @author nguyenmanhluu
 * @since Aug 27, 2013 - 11:20:21 PM
 */
?>
<hr/>
<h3>Business Gallery</h3>
<div class="row-fluid">
    <?php if ($model->gallery): ?>
        <?php $i = 0; ?>
        <?php foreach ($model->gallery as $gallery): ?>
            <?php $i++; ?>
            <div class="span2">
                <div class="row-fluid">
                    <div class="span12">
                        <div style="width: 120px;height: 100px">
                            <img src="<?php echo $gallery->publicThumb ?>" alt="User photo"
                                 style="max-width: 100px;max-height: 100px" />
                        </div>                        
                        <input id="Pic<?php echo $gallery->id ?>"type="checkbox" name="deleteGallery[]" 
                               value="<?php echo $gallery->id ?>"/>
                        <label for="Pic<?php echo $gallery->id ?>">Delete</label>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
            <?php if ($i % 6 == 0): ?>
            </div>
            <div class="row-fluid" style="margin-top: 10px">
            <?php endif; ?>
        <?php endforeach; ?>
    <?php endif; ?>
</div>
<div class="row-fluid">    
    <h3>Upload Photo</h3>
    <p class="muted">Recommended resolution: 240px X 240px for grid style</p>
    <input type="file" name="galleryImage[]" multiple />
</div>